﻿
using System;
using System.ComponentModel;
using System.Linq.Expressions;
namespace MyFramework.Common
{
    /// <summary>
    /// Interface entity
    /// </summary>
    public interface IEntity : INotifyPropertyChanging, INotifyPropertyChanged
    {
        /// <summary>
        /// Raises the property changing event.
        /// </summary>
        /// <typeparam name="TProperty">The type of the property.</typeparam>
        /// <param name="projection">The projection.</param>
        void RaisePropertyChangingEvent<TProperty>(Expression<Func<TProperty>> projection);

        /// <summary>
        /// Raises the property changed event.
        /// </summary>
        /// <typeparam name="TProperty">The type of the property.</typeparam>
        /// <param name="projection">The projection.</param>
        void RaisePropertyChangedEvent<TProperty>(Expression<Func<TProperty>> projection);

        /// <summary>
        /// Raises the property changed event.
        /// </summary>
        /// <param name="propertyName">Name of the property.</param>
        void RaisePropertyChangedEvent(string propertyName);

        /// <summary>
        /// Raises the property changing event.
        /// </summary>
        /// <param name="propertyName">Name of the property.</param>
        void RaisePropertyChangingEvent(string propertyName);


    }
}
